IF OBJECT_ID('ssf.ptx_get_task_group_id') IS NOT NULL
	DROP FUNCTION ssf.ptx_get_task_group_id
GO

CREATE FUNCTION ssf.ptx_get_task_group_id (
	@group_type NVARCHAR(128) = N'DEFAULT'
	, @group_name NVARCHAR(128)
)
RETURNS INT
AS
BEGIN
	RETURN (
		SELECT task_group_id
		FROM ssf.ptx_task_group WITH (NOLOCK)
		WHERE group_type = @group_type
		AND group_name = @group_name
	)
END
GO
